﻿using Light.Utility;
using System.ComponentModel;
using System.Data;

namespace Light.Framework.Model
{
    [Table("Logs")]
    public class Log : Entity
    {
        [Column("FType")]
        public LogType LogType { get; set; }

        [Searchable("内容")]
        [Column("FContent", Type = DbType.String)]
        public string Content { get; set; }
    }
    /// <summary>
    /// 日志类型
    /// </summary>
    public enum LogType
    {
        /// <summary>
        /// 登录日志
        /// </summary>
        [Description("登录")]
        Login,

        /// <summary>
        /// 操作日志
        /// </summary>
        [Description("操作")]
        Operation,

        /// <summary>
        /// 错误日志
        /// </summary>
        [Description("错误")]
        Error,

        /// <summary>
        /// 页面访问日志
        /// </summary>
        [Description("访问")]
        Visited
    }
}
